package com.ruiysoft.controller.order.vo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * OrderPlaceResponseVo
 */
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-11-11T01:42:09.977+08:00")

public class OrderPlaceResponseVo {
    /**
     * 总金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;

    /**
     * 现金支付金额
     */
    @JsonProperty("receivableAmount")
    private BigDecimal receivableAmount = null;

    /**
     * 商品总金额
     */
    private BigDecimal mdseTotalAmount;

    /**
     * 商品应收现金总额
     */
    private BigDecimal mdseReceivableAmount;
    /**
     * 虚拟支付总额
     */
    private Long receivableVirtualCoin;

    /**
     * 运费
     */
    @JsonProperty("freight")
    private BigDecimal freight = null;


    @JsonProperty("skuInfoList")
    @Valid
    private List<OrderSkuListCusVo> skuInfoList = null;


    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public OrderPlaceResponseVo totalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
        return this;
    }

    public BigDecimal getMdseTotalAmount() {
        return mdseTotalAmount;
    }

    public void setMdseTotalAmount(BigDecimal mdseTotalAmount) {
        this.mdseTotalAmount = mdseTotalAmount;
    }

    public OrderPlaceResponseVo mdseTotalAmount(BigDecimal mdseTotalAmount) {
        this.mdseTotalAmount = mdseTotalAmount;
        return this;
    }

    public BigDecimal getMdseReceivableAmount() {
        return mdseReceivableAmount;
    }

    public void setMdseReceivableAmount(BigDecimal mdseReceivableAmount) {
        this.mdseReceivableAmount = mdseReceivableAmount;
    }

    public OrderPlaceResponseVo mdseReceivableAmount(BigDecimal mdseReceivableAmount) {
        this.mdseReceivableAmount = mdseReceivableAmount;
        return this;
    }

    public Long getReceivableVirtualCoin() {
        return receivableVirtualCoin;
    }

    public void setReceivableVirtualCoin(Long receivableVirtualCoin) {
        this.receivableVirtualCoin = receivableVirtualCoin;
    }

    public OrderPlaceResponseVo receivableVirtualCoin(Long receivableVirtualCoin) {
        this.receivableVirtualCoin = receivableVirtualCoin;
        return this;
    }

    public OrderPlaceResponseVo receivableAmount(BigDecimal receivableAmount) {
        this.receivableAmount = receivableAmount;
        return this;
    }


    /**
     * 应收金额
     *
     * @return receivableAmount
     **/
    @ApiModelProperty(value = "应收金额")
    public BigDecimal getReceivableAmount() {
        return receivableAmount;
    }

    public void setReceivableAmount(BigDecimal receivableAmount) {
        this.receivableAmount = receivableAmount;
    }

    public OrderPlaceResponseVo freight(BigDecimal freight) {
        this.freight = freight;
        return this;
    }

    /**
     * 运费
     *
     * @return freight
     **/
    @ApiModelProperty(value = "运费")
    public BigDecimal getFreight() {
        return freight;
    }

    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }


    public OrderPlaceResponseVo skuInfoList(List<OrderSkuListCusVo> skuInfoList) {
        this.skuInfoList = skuInfoList;
        return this;
    }

    public OrderPlaceResponseVo addSkuInfoListItem(OrderSkuListCusVo skuInfoListItem) {
        if (this.skuInfoList == null) {
            this.skuInfoList = new ArrayList<OrderSkuListCusVo>();
        }
        this.skuInfoList.add(skuInfoListItem);
        return this;
    }

    /**
     * 商品信息
     *
     * @return skuInfoList
     **/
    @ApiModelProperty(value = "商品信息")

    @Valid

    public List<OrderSkuListCusVo> getSkuInfoList() {
        return skuInfoList;
    }

    public void setSkuInfoList(List<OrderSkuListCusVo> skuInfoList) {
        this.skuInfoList = skuInfoList;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OrderPlaceResponseVo orderPlaceResponseVo = (OrderPlaceResponseVo) o;
        return Objects.equals(this.receivableAmount, orderPlaceResponseVo.receivableAmount) &&
                Objects.equals(this.freight, orderPlaceResponseVo.freight) &&
                Objects.equals(this.skuInfoList, orderPlaceResponseVo.skuInfoList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(receivableAmount, freight, skuInfoList);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class OrderPlaceResponseVo {\n");

        sb.append("    receivableAmount: ").append(toIndentedString(receivableAmount)).append("\n");
        sb.append("    freight: ").append(toIndentedString(freight)).append("\n");
        sb.append("    skuInfoList: ").append(toIndentedString(skuInfoList)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}

